<!DOCTYPE html>
<html>
<head>
	<title></title>
	<base href="http://localhost/">
	<link rel="stylesheet" type="text/css" href="layui/css/layui.css">
	<script type="text/javascript" src="layui/layui.js"></script>
	<style>
		.header{
			width:100%;
			height:50px;
			line-height:50px;
			background:#2e6da4;color:#ffffff;
		}
		.header-title a{
			position: absolute;
		    left: 0;
		    top: 0;
		    width: 200px;
		    height: 100%;
		    line-height: 60px;
		    text-align: center;
		    color: #009688;
		    font-size: 25px;
		}
		.layui-nav{
			background-color: #23262E;
		}
		.layui-header{
			background-color: #23262E;
		}
		.layui-main{
			width: 1400px;
		}
		.layui-layout-left>.layui-nav-item{
			margin: 0 20px;
		}
	</style>
</head>
<body>
	<!-- header -->
	<div class="layui-header">
		<div class="layui-main">
		<div class="header-title">
			<a a href="javascript:;" onclick="click_wel(this);" src="index.php/welcome/wel">后台管理系统</a>
		</div>
		<ul class="layui-nav layui-layout-left" lay-filter="">
			<li class="layui-nav-item"><a href="javascript:;" onclick="click_userlist(this);" src="index.php/Main/page_list">用户管理</a></li>
			<li class="layui-nav-item"><a href="javascript:;" onclick="click_bookslist(this);" src="index.php/Admbooks/admbookspage_list">图书管理</a></li>
			<li class="layui-nav-item">
			    <a href="javascript:;">借阅管理</a>
			    <dl class="layui-nav-child"> <!-- 二级菜单 -->
			      <dd><a href="javascript:;" onclick="click_booksBorrow(this);" src="index.php/Borrowbooks/books_borrow">图书借阅</a></dd>
			      <dd><a href="javascript:;" onclick="click_booksreturn(this);" src="index.php/Borrowbooks/books_return">图书归还</a></dd>
			    </dl>
			</li>
			<!-- <li class="layui-nav-item"><a href="">社区</a></li> -->
			
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item">
					<a href=""><img src="//t.cn/RCzsdCq" class="layui-nav-img"><?=$_SESSION["login_user"]["name"]?></a>
					    <dl class="layui-nav-child">
					      <dd><a href="javascript:;">修改信息</a></dd>
					      <dd><a href="javascript:;">安全管理</a></dd>
					    </dl>
				</li>	
				<li class="layui-nav-item">
						<a href="<?php echo site_url('/User/quit')?>">退出</a>
				</li>
			
			</ul>
				
	</div>
	</div>
	<!-- 主操作页面 -->
	<div class="">
		<iframe src="index.php/welcome/wel"  style="width:100%;height:900px;" frameborder="0" scrolling="0"></iframe>
	</div>
<script>
//注意：折叠面板 依赖 element 模块，否则无法进行功能性操作
	layui.use('element', function(){
	  var element = layui.element;	  
	  //…
	  $ = layui.jquery;
	  resetMenuHeight();
	});
	/*重新设主操作页面*/
	//onload="resetMainHeight(this)"
	// function resetMainHeight(obj){
	// 	var height = parent.document.documentElement.clientHeight - 52;
	// 	$(obj).parent('div').height(height);
	// }
	/*点击切换到主页*/
	function click_wel(obj){
		var src = $(obj).attr('src');
		$('iframe').attr('src',src);
	}
	/*点击切换用户管理*/
	function click_userlist(obj){
		var src = $(obj).attr('src');
		$('iframe').
		attr('src',src);
	}
	/*点击切换图书管理*/
	function click_bookslist(obj){
		var src = $(obj).attr('src');
		$('iframe').attr('src',src);
	}
	/*点击切换借阅管理*/
	function click_booksBorrow(obj){
		var src = $(obj).attr('src');
		$('iframe').attr('src',src);
	}
	/*点击切换借阅管理-归还*/
	function click_booksreturn(obj){
		var src = $(obj).attr('src');
		$('iframe').attr('src',src);
	}


</script>
</body>
</html>